
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type LiveRoomRequest struct {

	RoomId string `json:"room_id" form:"room_id"`

	Name string `json:"name" form:"name"`

	CoverImg string `json:"cover_img" form:"cover_img"`

	ShareImg string `json:"share_img" form:"share_img"`

	StartTime string `json:"start_time" form:"start_time"`

	EndTime string `json:"end_time" form:"end_time"`

	AnchorName string `json:"anchor_name" form:"anchor_name"`

	AnchorWechat string `json:"anchor_wechat" form:"anchor_wechat"`

	Phone string `json:"phone" form:"phone"`

	Type string `json:"type" form:"type"`

	ScreenType string `json:"screen_type" form:"screen_type"`

	CloseLike string `json:"close_like" form:"close_like"`

	CloseGoods string `json:"close_goods" form:"close_goods"`

	CloseComment string `json:"close_comment" form:"close_comment"`

	ErrorMsg string `json:"error_msg" form:"error_msg"`

	Status string `json:"status" form:"status"`

	LiveStatus string `json:"live_status" form:"live_status"`

	Mark string `json:"mark" form:"mark"`

	ReplayStatus string `json:"replay_status" form:"replay_status"`

	Sort string `json:"sort" form:"sort"`

	IsShow string `json:"is_show" form:"is_show"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *LiveRoomRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *LiveRoomRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"room_id": "required",

		"name": "required",

		"cover_img": "required",

		"share_img": "required",

		"start_time": "required",

		"end_time": "required",

		"anchor_name": "required",

		"anchor_wechat": "required",

		"phone": "required",

		"type": "required",

		"screen_type": "required",

		"close_like": "required",

		"close_goods": "required",

		"close_comment": "required",

		"error_msg": "required",

		"status": "required",

		"live_status": "required",

		"mark": "required",

		"replay_status": "required",

		"sort": "required",

		"is_show": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *LiveRoomRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LiveRoomRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LiveRoomRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
